from selenium import webdriver
# from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from time import sleep
from postion import options
from postion import service
from login_para import Login

url=r'http://192.168.92.131/upload/'
username = 'admin'
password = '123456'
driver=webdriver.Chrome(options=options,service=service)
driver.get(url)
driver.maximize_window()



# 登录
login = Login(driver)
login.login(username, password)
#查看帖子
driver.find_element(By.XPATH,'//*[@id="category_1"]/table/tbody/tr[1]/td[2]/h2/a').click()
sleep(2)
driver.find_element(By.CLASS_NAME,'s.xst').click()
sleep(2)

#退出
login.logout()